<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>${forum.title} - ${site.name} - powered by jeebbs</title>
    <meta name="keywords" content="${forum.keywords!}" />
    <meta name="description" content="${(forum.description!)?html}" />
	<link href="${resSys}/front.css" rel="stylesheet" type="text/css"/>
    <script src="${resSys}/jquery.js" type="text/javascript"></script>
    <script src="${resSys}/front.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/${res}/bbs_forum/css/whole.css" />
    <link rel="stylesheet" type="text/css" href="/${res}/bbs_forum/css/layout.css" />
	<script type="text/javascript">
	function editTitle(id) {
		$('#title'+id).show();
		$('#link'+id).hide();
		$('#title'+id).select();
	}
	function updateTitle(id) {
		var title = $('#title'+id).val();
		if($('#link'+id).text() == title) {
			//do nothing
		} else if($.trim(title).length<2) {
			alert("标题不能小于2个字符");
		} else  {
			$.postJson('${base}/jeebbs/TopicTitleUpdate.do', {
				'topicId' : id,
				'title' : title
			}, function(data) {
				if (!data.success) {
					alert(date.msg);
				}
			});
		}
		$('#title'+id).hide();
		$('#link'+id).text(title).show();
	}
	function manageTopic(url) {
		var batchChecks = document.getElementsByName('topicIds');
		var hasChecked = false;
		for(var i=0; i<batchChecks.length; i++) {
			if(batchChecks[i].checked) {
				hasChecked = true;
				break;
			}
		}
		if(!hasChecked) {
			alert('请选择要操作的数据！');
			return;
		}
		var form = document.getElementById('jvForm');
		form.action=url;
		form.submit();
   }

	function checkall(){
	        var batchChecks = document.getElementsByName('topicIds');
	        var onCheck = document.getElementById('checkAll');
	        if(onCheck.checked){
			for(var i=0; i<batchChecks.length; i++) {
				batchChecks[i].setAttribute("checked","checked");
			}
			}else{
			for(var i=0; i<batchChecks.length; i++) {
				batchChecks[i].setAttribute("checked","");
			}
			}
	}
	function showChild(typeId){
		$("#childType_"+typeId).toggle();
	}
	</script>
  </head>
  
  <body>
    <!--header--> [#include "../include/页头.html"/]<!--/header--> 
    <!--登录统计栏_Begin-->[#include "../include/登录统计.html"/]<!--登录统计栏_End-->
    
	<!--main-->
    <div class="main-wrap">
    
    <div id="main">
	
    <div class="c"></div>
    <div class="cc" id="breadCrumb"><img align="absmiddle" style="cursor: pointer;" src="/${res}/bbs_forum/img/home.gif" alt="" /> 
	<a href="${base}/">${site.name}</a> &raquo; <a href="${forum.url}">${forum.title}</a></div>
    <div class="c"></div>
    <div class="t">
    <table width="100%" cellspacing="0" cellpadding="0">
      [#if forum.description?? && forum.description?trim!='']
      <tbody>
        <tr class="tr2">
          <td style="line-height:25px;"><strong>板块介绍：</strong><br />
          ${forum.description!}</td>
        </tr>
        [/#if] 		 		
		[#if forum.forumRule?? && forum.forumRule?trim!='']
        <tr class="tr3">
          <td style="line-height:25px;"><strong>本版规则：</strong><br />
          ${forum.forumRule!}</td>
        </tr>
        [/#if]
      </tbody>
    </table>
    </div>
    <div id="c" class="c"></div>
    <div class="t3">
    [#if user??]
    <span class="fr"> 	
    <a href="${base}/topic/v_add${forum.id!}.jspx"><img id="td_post" src="/${res}/bbs_forum/img/post.png" alt="" /></a>
    <a href="${base}/topic/v_add${forum.id!}.jspx?category=vote"><img id="td_post" src="/${res}/bbs_forum/img/fqtp.png" alt="" /></a>
    </span> 
    [/#if]
    <span class="fl">[@topic_page forumId=forum.id findType=type topLevel='0' count='15' tpl='0'][#include "../tag/forumtopic.html"/] [/@topic_page]</span>
    <div class="c"></div>
    </div>
    <div class="c"></div>
    <div style="display: none;" class="menu menu-post cc f14 tac" id="menu_post">
    <div style="width: 75px;" class="menu-b"><a href="post-htm-fid-40.html">新 帖</a></div>
    </div>
    <div style="margin: auto;" class="t z">
	<form method="post" action="" id="jvForm">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
	  <tr>
	  <th class="h" colspan="5">
	  【<a href="${forum.url}">全部主题</a>】 【<a href="${forum.url?substring(0,forum.url?length-6)}_jing${forum.url?substring(forum.url?length-6,forum.url?length)}">精华</a>】	  </th></tr>
	   <tr>
	  <th class="h" colspan="5">
	  [@bbs_posttype forumId=forum.id]
		  [#list tag_list as type]
		 	【<a href="${base}/${forum.path!}/type/${type.id}.jhtml" onmouseover="showChild('${type.id}')">${type.typeName!}</a>】
			[#if child_list[type.id?string]?size gt 0]
			 	<ul id="childType_${type.id}" style="display: none;" onmouseout="showChild('${type.id}')">
				 	 [#list child_list[type.id?string] as child]
				 	 	 <li>【<a href="${base}/${forum.path!}/type/${child.id}.jhtml">${child.typeName!}</a>】</li>
				 	  [/#list]
			 	 </ul>
		 	 [/#if]
		  [/#list]
	   [/@bbs_posttype]
	  </th></tr>
	  
	  <tbody style="table-layout:fixed;">
        <tr class="tr2" style="height:30px;">
          <td class="tac y-style" style="width:">&nbsp;</td>
          <td class="tac">标 题</td>
          <td class="y-style" style="width:12em">作 者</td>
          <td class="tal y-style" style="width:10em">回 复 / 人 气</td>
          <td class="y-style" style="width:13em">最后发表</td>	  
        </tr>
		<!--置顶主题列表_Begin-->
		
		[#if pageNo==1]
		[@topic_page topLevel='1' count='10' tpl='0' typeId='${typeId!}' parentTypeId='${parentTypeId!}']
		[#list tag_pagination.list as topic]
		[#if topic.topLevel==3||(topic.topLevel==2&&topic.forum.category.id==forum.category.id)||(topic.topLevel==1&&topic.forum.id==forum.id)]
          <tr align="center" class="tr33 t_one">
            <td>
            [#if topic.category==100]
			  [#if topic.replyCount gt 10]
			  <img align="absmiddle" src="/${res}/bbs_forum/img/hot.gif" alt="热帖" />			  
			  [#else]
			     [#if topic.frontStatus==1]<img align="absmiddle" src="/${res}/bbs_forum/img/rtopic.jpg" alt="新帖" />
			     [#elseif topic.frontStatus==2]<img align="absmiddle" src="/${res}/bbs_forum/img/topic.gif"/>
			     [#elseif topic.frontStatus==3]锁[/#if]
			  [/#if]
			  [#else]
			 	  <img align="absmiddle" src="/${res}/bbs_forum/img/votenew.gif" alt="投票" />
			 [/#if] 
			  </td>
            <td style="text-align: left; line-height: 23px;">		
            [#if moderators]
			<input type="checkbox" name="topicIds" value="${topic.id}"/>
			[/#if]	
            [#if topic.style]
			[#if topic.styleBold]<strong>[/#if]
			[#if topic.styleItalic]<em>[/#if]
			<a id="link${topic.id}" href="${topic.url!}" [#if topic.styleColor?? && topic.styleColor?length>0] style="color:#${topic.styleColor};"[/#if]>${topic.title?html!} <img src="/${res}/bbs_forum/img/headtopic_${topic.topLevel!}.gif"/></a>&nbsp;[#if topic.moderatorReply??&&topic.moderatorReply]<img src="/${res}/bbs_forum/img/banzhu.gif"/>
			[/#if]
			[#if topic.affix??&&topic.affix]<img src="/${res}/bbs_forum/img/comm.gif"/>[/#if]
			[#if topic.styleItalic]</em>[/#if]
			[#if topic.styleBold]</strong>[/#if]
			[#else]
					<a id="link${topic.id}" href="${topic.url}">${topic.title?html}</a>
			[/#if]			</td>			
            <td class="tal y-style" style="line-height:22px;">
			${topic.creater.username!}<div class="f10 gray2">
			<span style="color:#838383;">${topic.createTime?string("yyyy-MM-dd HH:mm:ss")}</span>
			</div>
			</td>
            <td class="tal y-style f10" style="line-height:22px;"><span class="s8">${topic.replyCount!}</span> / [@topic_vcount topicId=topic.id]${viewCount!}[/@topic_vcount]</td>
          	<td class="tal y-style"> 
			<span style="color:#838383;">[#if topic.lastReply??]${topic.lastTime!?string("yyyy-MM-dd HH:mm:ss")}</span><br /><span class="b">by: ${topic.lastReply.username!}[/#if]</span>			</td>
          </tr>
          [/#if]
          [/#list]
          [/@topic_page]
		<!--置顶主题列表_End-->
	      [/#if]
		<tr class="tr2" style="height:30px;"><td colspan="6" bgcolor="f2f9ff" class="tac" >普通主题</td>
		</tr>
		<!--普通主题列表_Begin-->
        [@topic_page forumId=forum.id findType=type topLevel='0' count='15' tpl='0' typeId='${typeId!}' parentTypeId='${parentTypeId!}']
        [#list tag_pagination.list as topic]
		<tr align="center" class="tr33 t_one">
		<td>		
		[#if topic.category==100]
			  [#if topic.replyCount gt 10]
			  <img align="absmiddle" src="/${res}/bbs_forum/img/hot.gif" alt="热帖" />			  
			  [#else]
			     [#if topic.frontStatus==1]<img align="absmiddle" src="/${res}/bbs_forum/img/rtopic.jpg" alt="新帖" />
			     [#elseif topic.frontStatus==2]<img align="absmiddle" src="/${res}/bbs_forum/img/topic.gif"/>
			     [#elseif topic.frontStatus==3]锁[/#if]
			  [/#if]		
		  [#else]
		 	  <img align="absmiddle" src="/${res}/bbs_forum/img/votenew.gif" alt="投票" />
		 [/#if]
	 </td>
		<td style="text-align: left; line-height: 23px;">
		[#if moderators]
		<input type="checkbox" name="topicIds" value="${topic.id}"/>
		[/#if]
		[#if topic.style]
		[#if topic.styleBold]<strong>[/#if]
		[#if topic.styleItalic]<em>[/#if]
		<a id="link${topic.id}" href="${topic.url!}" 
		[#if topic.styleColor?? && topic.styleColor?length>0] 
		style="color:#${topic.styleColor};"[/#if]>${topic.title?html!}		</a>
		[#if topic.primeLevel!=0]
			[#if topic.primeLevel==1]<img src="/${res}/bbs_forum/img/jing1.jpg" alt="" />
			[#elseif topic.primeLevel==2]<img src="/${res}/bbs_forum/img/jing2.jpg" alt="" />
			[#elseif topic.primeLevel==3]<img src="/${res}/bbs_forum/img/jing3.jpg" alt="" />
			[/#if]
		[/#if]
		&nbsp;[#if topic.moderatorReply??&&topic.moderatorReply]<img src="/${res}/bbs_forum/img/banzhu.gif"/>[/#if]
		[#if topic.affix??&&topic.affix]<img src="/${res}/bbs_forum/img/comm.gif"/>[/#if]
		[#if topic.styleItalic]</em>[/#if]
		[#if topic.styleBold]</strong>[/#if]
		[#else]
				<a id="link${topic.id}" href="${topic.url}">${topic.title?html}</a>
		[/#if]		</td>
		<td class="tal y-style">${topic.creater.username!}
		<div class="f10 gray2">
		<span style="color:#838383;">${topic.createTime!?string("yyyy-MM-dd HH:mm:ss")}</span>
		</div></td>
		<td class="tal y-style f10"><span class="s8">${topic.replyCount!}</span> / [@topic_vcount topicId=topic.id]${viewCount!}[/@topic_vcount]</td>
		[#if topic.lastReply??]
		<td class="tal y-style">
		<span style="color:#838383;">${topic.lastTime!?string("yyyy-MM-dd HH:mm:ss")}</span><br />
		<span class="b">by: ${topic.lastReply.username!}</span></td>
		[/#if]		</tr>
		[/#list]
        [/@topic_page]
		<!--普通主题列表_End-->
		[#if user??]
		<tr align="center" class="tr3 t_one">
          <td></td>
          <td colspan="4" style="line-height: 23px; text-align: left">
   [#if uptop]
   <input id="checkAll" type="checkbox" onclick="checkall();" value="on" />全选
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/v_upTopInput.jspx');" value="置顶" />
  [/#if]
  [#if manager]
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/v_primeInput.jspx');" value="精华" />
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/v_highlightInput.jspx');" value="加亮" />
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/v_lockInput.jspx');" value="锁定/打开" />
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/v_upordownInput.jspx');" value="提升/下沉" />
  [/#if]
  [#if sheild]
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/v_moveInput.jspx');" value="移动" />
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/v_shieldInput.jspx');" value="屏蔽" />
  [/#if]
  [#if moderators]
  <input class="bta" type="button" onclick="manageTopic('${base}/topic/o_delete.jspx');" value="删除" />
  [/#if]          </td>
		</tr>		
		[/#if]
    </table>
	<input type="hidden" value="${forum.id}" name="forumId" />
    </form>
    </div>
    <div class="t3">
    <table width="100%" cellspacing="0" cellpadding="0">
      <tbody>
        <tr>
          <td height="40">
          <form action="${base}/topic/v_searchDayTopic.jspx">
            <input type="hidden" name="forumId" value="${forum.id}"/>
            <select name="day">
            <option value="1">1天内的主题</option>
            <option value="2">2天内的主题</option>
            <option value="7">1星期内的主题</option>
            <option value="30">1个月内的主题</option>
            <option value="60">2个月内的主题</option>
            <option value="90">3个月内的主题</option>
            <option value="180">6个月内的主题</option>
            <option value="365">1年内的主题</option>
            </select>
			<input type="button" onclick="this.form.submit();" value="提 交" class="btn" />
          </form>          </td>
          <td width="40%" align="right"></td>
        </tr>
      </tbody>
    </table>
    </div>
    <div class="t3">
	[#if user??]
	<span class="fr">
		<a href="${base}/topic/v_add${forum.id!}.jspx"><img id="td_post1" src="/${res}/bbs_forum/img/post.png" alt="" /></a>
		<a href="${base}/topic/v_add${forum.id!}.jspx?category=vote"><img id="td_post" src="/${res}/bbs_forum/img/fqtp.png" alt="" /></a>
	</span>
	[/#if]
	<span class="fl">[@topic_page forumId=forum.id findType=type topLevel='0' count='15' tpl='0'][#include "../tag/forumtopic.html"/] [/@topic_page]</span>
    <div class="c"></div>
    </div>
    <div class="c"></div>
    </div>
    </div>
    <!--/main-->
	<!--footer--> [#include "../include/页脚.html"/] <!--footer-->
  </body>
</html>